separate_arguments(DOCSTRING_SOURCES)
foreach (it ${DOCSTRING_SOURCES})
  set(DOCSTRING_IN_FILE ${CURRENT_SOURCE_DIR}/${it})
  get_filename_component (DOCSTRING_FILE_BASENAME ${DOCSTRING_IN_FILE} NAME_WE)
  set (DOCSTRING_FILE ${CMAKE_CURRENT_BINARY_DIR}/${DOCSTRING_FILE_BASENAME}.i)
  file (READ ${DOCSTRING_IN_FILE} DOCSTRING_IN_FILE_LINES)
  if (TIMES STREQUAL x2)
    string (REGEX REPLACE "\\\\" "\\\\\\\\\\\\\\\\" DOCSTRING_FILE_LINES "${DOCSTRING_IN_FILE_LINES}")
  else ()
    string (REGEX REPLACE "\\\\" "\\\\\\\\" DOCSTRING_FILE_LINES "${DOCSTRING_IN_FILE_LINES}")
  endif ()
  file (WRITE ${DOCSTRING_FILE} "${DOCSTRING_FILE_LINES}")
endforeach ()
